<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title> API Reference Documentation
        - Class: Form</title>
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta http-equiv="imagetoolbar" content="no" />
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <link href="css/pygments.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="page">
        <div id="header">
            <h1> API Reference</h1>
        </div>
        <div id="browser">
            <div class="browser-section">
                <h2>Module Index</h2>
                <ul>
                    <li class="active">
                        <a href="formosa.html">formosa</a>
                    </li><li>
                        <a href="formosa.fields.html">formosa.fields</a>
                    </li><li>
                        <a href="formosa.validators.html">formosa.validators</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Methods</h2>
                <ul>
                    <li>
                        <a href="formosa.Form.html#method-translate">translate</a>
                    </li>
                </ul>
            </div>
        </div>
        <div id="content">
    <h1>Class: Form</h1>
    <div class="docstring rst"><p>Translator of user input into Python values.</p>
<p>Forms translate a <tt class="docutils literal"><span class="pre">MultiDict</span></tt> of user input to a <tt class="docutils literal"><span class="pre">dict</span></tt> of validated
Python values suitable for safe use by an application.  A form is composed
by any number of fields, and each field is assigned a key.  This key is
where the field's translated value is stored in the resulting <tt class="docutils literal"><span class="pre">dict</span></tt>.</p>
<p>Forms may also have any number of validators to enforce higher-order
constraints across multiple fields.  Validators execute after the form's
fields have been translated.  Validators execute even if one or more
fields raise <tt class="docutils literal"><span class="pre">TranslationError</span></tt>, though any offending field is omitted
from their input.  (Because of this, most validators skip validation if
one or more expected value is missing.)</p>
</div>
    <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
</ul>
    <div>
        <h2>Methods</h2>
            <h3 id="method-translate">
                translate
                <span class="args">(self, input)</span>
            </h3>
            <div class="docstring rst"><p>Return a <tt class="docutils literal"><span class="pre">dict</span></tt> of valid Python values translated from a
<tt class="docutils literal"><span class="pre">MultiDict</span></tt> of user input.  Raise <tt class="docutils literal"><span class="pre">ErrorSet</span></tt> if one or more field
raises <tt class="docutils literal"><span class="pre">TranslationError</span></tt>, or if any validator raises
<tt class="docutils literal"><span class="pre">ValidationError</span></tt>.</p>
</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
</ul>
    </div>
        </div>
        <div id="footer">
            Generated with <a href="http://apydia.ematia.de/" class="extern">
            Apydia 0.0.2</a> on 2008-11-26 11:09
        </div>
    </div>
</body>
</html>